package com.lwh.springboot.service.impl;

import com.lwh.springboot.mapper.CarMapper;
import com.lwh.springboot.pojo.entity.Car;
import com.lwh.springboot.service.ICarService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

// Alt+Enter:快速修复一些错误
@Service
public class CarServiceImpl implements ICarService {
    @Autowired
    private CarMapper carMapper;

    //业务
    @Override
    public List<Car> selectAll() {
        List<Car> list = carMapper.selectAll();
        return list;
    }

    @Override
    public Car selectById(Integer id) {
        return carMapper.selectById(id);
    }

}
